package com.lagou.module2.task3.play.impl;

import com.lagou.module2.task3.card.SIMCard;
import com.lagou.module2.task3.play.CallService;
import com.lagou.module2.task3.play.Package;

public class CallServiceImpl extends Package implements CallService{

    // 通话时长
    private int callDuration;
    // 短信条数
    private int messageCount;
    // 每月资费
    private int monthlyChargs;

    public CallServiceImpl(){}

    public CallServiceImpl(int callDuration, int messageCount, int monthlyChargs){
        setCallDuration(callDuration);
        setMessageCount(messageCount);
        setMonthlyChargs(monthlyChargs);
    }

    public int getCallDuration() {
        return callDuration;
    }

    public void setCallDuration(int callDuration) {
        this.callDuration = callDuration;
    }

    public int getMessageCount() {
        return messageCount;
    }

    public void setMessageCount(int messageCount) {
        this.messageCount = messageCount;
    }

    public int getMonthlyChargs() {
        return monthlyChargs;
    }

    public void setMonthlyChargs(int monthlyChargs) {
        this.monthlyChargs = monthlyChargs;
    }

    @Override
    public void show() {
        System.out.println("通话套餐信息如下");
        System.out.println("剩余通话时长：" + getCallDuration() + ", 剩余短信条数" + getMessageCount() + ", 每月资费" + getMonthlyChargs());
    }

    @Override
    public void call(int minutes, SIMCard simCard) {
        System.out.println("用户小张使用了通话服务，已经通话 " + minutes + "分钟");
    }
}
